import request from './index'

const basePath ="http://81.69.252.166:1999"
export function getWeather(params) {
    return request({
        method: 'get',
        url: `https://service-iw45ygyx-1255468759.ap-beijing.apigateway.myqcloud.com/release/view`,
        params: params || {},
    });
}

export function getLandIds() {
    ///LandIds
    return request({
        method: 'get',
        url:basePath+'/LandIds'
    });
}

export function getCurrentData(LandIds) {
    return request({
        method: 'get',
        url:`${basePath}/${LandIds}/CurrentData`
    });
}
export function getTodayData(LandIds) {
    return request({
        method: 'get',
        url:`${basePath}/${LandIds}/TodayData`
    });
}
export function getHistoryData(data) {
    return request({
        method: 'post',
        url:`${basePath}/History`,
        data
    });
}
export function getEvaporation(data) {
    return request({
        method: 'post',
        url:`${basePath}/IrrigateCalc`,
        data
    });
}
export function dispersionQuery(data) {
    return request({
        method: 'post',
        url:`${basePath}/dispersionQuery`,
        data
    });
}
export function landDeviceQuery(data) {
    return request({
        method: 'post',
        url:`${basePath}/landDeviceQuery`,
        data
    });
}
export function controlQuery(data) {
    return request({
        method: 'post',
        url:`${basePath}/controlQuery`,
        data
    });
}
// 开关 /relay
export function controlSwitch(data) {
    return request({
        method: 'post',
        url:`${basePath}/relay`,
        data
    });
}




